<!doctype html>
<html>
 <head>
 <center>
  <meta charset="UTF-8">
  <title>个人用户注册</title>
 </head>
 <body>
  <form method="post" action="doadd.php"   enctype="multipart/form-data" >
  <?php 
  require_once('dbConn.php');
  require_once('myFunc.php');
  connect();
  //编写sql语句
  $sql = 'select * from category';
  //echo $sql.'<br/>';  
  $result = fetch_array($sql); 
   
   ?>
  <table  border="1">
  <tr>
  <td>家具名称：</td>   
  <td><input type="text" name="lcy_name" required>  </td>
  </tr>
  
<tr>
  <td>所属类别：</td>   
  <td>
  <select name="lcy_cid" id="lcy_cname" >
   <option value="0">请选择</option>
<?php 
    foreach($result as $row){
            echo '<option value='.$row['lcy_cid'].'>'.$row['lcy_cname'].'</option>'; 
            }

 ?> 
  
  </select>
  </td>
  </tr>
  <tr>
  <td>产地：</td>   
  <td><input type="text" name="lcy_brand" required></td>
  </tr>
  <tr>
  <td>上传照片：</td>   
  <td>
  <input type="file" name="lcy_jiajulink">
  </td>
  </tr>
   <tr>
  <td>照片介绍：</td>   
  <td>
  <textarea name="lcy_intro">照片介绍</textarea>
  </td>
  </tr>
  <tr>
  <td colspan="2">
  <input type="submit" value="添加">
    <input type="reset" value="重置">
  </td>
  </tr>
   </center>
 </table>
 </form>
 </body>
</html>